package com.mlnx.device.enums;

import com.mlnx.common.enums.BaseCodeEnum;

/**
 * Created by amanda.shan on 2019/10/10.
 */
public enum DeviceType implements BaseCodeEnum<Integer> {
    SERVER(0X00, "服务器设备"), USR(0X07, "用户"), BP_DEVICE(0X01, "血压设备"),
    SBP_DEVICE(0X08, "带血氧的血压设备"), ECG_DEVICE(0X03, "心电设备"), MP_DEVICE(0X04, "多参设备"),
    XM_BP(0X06, "星脉血压设备"), SPO_DEVICE(0X02, "血氧设备"), WATCH_DEVICE(0X05, "手表设备"),
    ZK_BP(0X09, "正康血压计"), XIAOLOU_SPO_DEVICE(0X0A, "小楼血氧设备"), SUGAR_DEVICE(0X0B, "血糖设备"),
    PHONE_DEVICE(0X0C, "手机设备") ,YOUR_BP(0X0D, "优瑞恩血压计");

    private int code;

    private String message;

    DeviceType(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getValue() {
        return code;
    }

//    @Override
//    public String toString() {
//        return code + "";
//    }

    public String getMessage() {
        return message;
    }

    public static void main(String[] args) {
        DeviceType server = Enum.valueOf(DeviceType.class, "SERVER");
        System.out.println(server);
    }
}
